package xijia.plus.docs.thymeleafuser.controller;

import io.github.wslxm.springbootplus2.core.constant.BaseConstant;
import io.github.wslxm.springbootplus2.core.result.Result;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xijia.plus.docs.thymeleafuser.service.TpService;

/**
 * 整站静态化
 * @author wangsong
 * @version 1.0.0
 * @mail 1720696548@qq.com
 * @date 2022/11/14 0014 20:19
 */
@Slf4j
@RestController
@RequestMapping(BaseConstant.Uri.API_CLIENT + "/tp")
public class TpController {

    @Autowired
    private TpService tpService;


    @PostMapping(value = "/gca")
    @ApiOperation(value = "整站静态化")
    public Result<Boolean> gca() {
        tpService.siteStatic();
        return Result.success(true);
    }
}
